function tableDetailButtonClicked(event) {
    var detailButton = event.currentTarget;
    if (detailButton.innerHTML == '返回') {
        $(detailButton).removeClass('table_detail_background');
        $(detailButton).removeClass('table_detail_button_back');
        detailButton.innerHTML = '详细 <i class="iconfont icon-arrow-down attend_table_detail_arrow"></i>';
        var detail_content_id = 'attend_detail_content' + detailButton.getAttribute('data-id');
        var detail_area_id = 'attend_detail_area' + detailButton.getAttribute('data-id');
        $("[data-id="+detail_content_id+"]").animate({
            'height': '0',
            'padding': '0',
            'line-height': '0'
        }, 'fast', function () {
            $("[data-id="+detail_area_id+"]").addClass('table_detail_content_hide');
        });
    }
    else {
        $(detailButton).addClass('table_detail_background');
        $(detailButton).addClass('table_detail_button_back');
        detailButton.innerHTML = '返回';
        var detail_content_id = 'attend_detail_content' + detailButton.getAttribute('data-id');
        var detail_area_id = 'attend_detail_area' + detailButton.getAttribute('data-id');
        $("[data-id="+detail_area_id+"]").removeClass('table_detail_content_hide');
        $("[data-id="+detail_content_id+"]").animate({
            'height': 'auto',
            'padding': '6px 8px',
            'line-height': '18px'
        }, 'fast');
    }

}

$(document).ready(function(e) {
    $('.btn-search-status').click(function(e) {

        console.log( $('.input-status').val());
        if ( $('.input-status').val() == '当日考勤表' ) {
            var allTr = $('tr');
            for (var i=0; i<allTr.length; i++) {
                var tr = allTr[i];
                if (!tr.className) {
                    $(tr).show();
                }
            }
        }
        else {
            $('tr[data-error="false"]').hide();
        }

        return false;
    });
});
